
<include file="Public/ace_header" />
    <div class="row">
        <form class="form-horizontal" role="form" method="post" enctype="multipart/form-data" style="padding-left: 10px;padding-right: 10px;">
            <input type="hidden" class="width-100" id="user_id" name="user_id"  value="{:session('商家')['id']}" />
            <input type="hidden" class="width-100" id="transaction_type" name="transaction_type"  value="发起" />
            <input type="hidden" class="width-100" id="already_num" name="already_num"  value="0" />
            <input type="hidden" class="width-100" id="state" name="state"  value="待审核" />
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="funding_type"> 筹单类型 </label>
                <div class="col-xs-12 col-sm-6">
                    <span class="block input-icon input-icon-right">
                        <select name="funding_type" id="funding_type" class="width-100" >
                            <php> $funding_type = D(FundingType)->select(); </php>
                            <volist name="funding_type" id="vo">
                            <option value="{$vo['id']}" <if condition ="$model['funding_type'] eq $vo['id']"> selected </if>>{$vo['long_name']}</option>
                            </volist>
                        </select>
                        <i class=""></i>
                    </span>
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
             </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="total_num"> 总人数 </label>
                <div class="col-xs-12 col-sm-6">
                    <span class="block input-icon input-icon-right">
                        <input type="text" class="width-100" placeholder="总人数" id="total_num" name="total_num"  value="{$model['total_num']|default=''}" validate-required="required:请填写总人数" />
                        <i class=""></i>
                    </span>
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
             </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="funding_price"> 众筹价格 </label>
                <div class="col-xs-12 col-sm-6">
                    <span class="block input-icon input-icon-right">
                        <input type="text" class="width-100" placeholder="众筹价格" id="funding_price" name="funding_price"  value="{$model['funding_price']|default=''}" validate-required="required:请填写众筹价格" />
                        <i class=""></i>
                    </span>
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
             </div>

            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="is_budget"> 是否优惠 </label>
                <div class="col-xs-12 col-sm-6">
                    <span class="block input-icon input-icon-right">
                        <select name="is_budget" id="is_budget" class="width-100" >
                             <option value="是" <if condition ="$model['is_budget'] eq '是'"> selected </if> >是</option>
                             <option value="否" <if condition ="$model['is_budget'] eq '否'"> selected </if> >否</option>
                        </select>
                        <i class=""></i>
                    </span>
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
             </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="is_consignment"> 是否代卖 </label>
                <div class="col-xs-12 col-sm-6">
                    <span class="block input-icon input-icon-right">
                        <select name="is_consignment" id="is_consignment" class="width-100" >
                             <option value="否" <if condition ="$model['is_consignment'] eq '否'"> selected </if> >否</option>
                             <option value="是" <if condition ="$model['is_consignment'] eq '是'"> selected </if> >是</option>
                        </select>
                        <i class=""></i>
                    </span>
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
             </div>
             <script type="text/javascript">
                 $('#is_consignment').change(function(){
                    if ($(this).val() == '是') {
                        $("#consignment-price-div").removeClass("hidden");
                    } else {
                        $("#consignment-price-div").addClass("hidden");
                    }
                 });
             </script>
             <php>
                $hidden = '';
                if ($model['is_consignment'] === '是') {
                    $hidden = 'hidden';
                }
             </php>
             <div class="form-group hidden" id="consignment-price-div">
                <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="consignment_price"> 代卖佣金 </label>
                <div class="col-xs-12 col-sm-6">
                    <span class="block input-icon input-icon-right">
                        <input type="text" class="width-100" placeholder="代卖佣金" id="consignment_price" name="consignment_price"  value="{$model['consignment_price']|default='0'}" validate-required="required:请填写代卖佣金" />
                        <i class=""></i>
                    </span>
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
             </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="is_togethor"> 是否合单 </label>
                <div class="col-xs-12 col-sm-6">
                    <span class="block input-icon input-icon-right">
                        <select name="is_togethor" id="is_togethor" class="width-100" >
                             <option value="否" <if condition ="$model['is_togethor'] eq '否'"> selected </if> >否</option>
                             <option value="是" <if condition ="$model['is_togethor'] eq '是'"> selected </if> >是</option>
                        </select>
                        <i class=""></i>
                    </span>
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
             </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="lose_time"> 失效时间 </label>
                <div class="col-xs-12 col-sm-6">
                    <span class="block input-icon input-icon-right">
                        <input type="text" class="width-100" placeholder="失效时间" id="lose_time" name="lose_time"  value="{$model['lose_time']|default=''|date='Y-m-d H:i:s',###}" validate-required="required:请填写失效时间" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" readonly=""/>
                        <i class=""></i>
                    </span>
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
             </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="name"> 名称 </label>
                <div class="col-xs-12 col-sm-6">
                    <span class="block input-icon input-icon-right">
                        <input type="text" class="width-100" placeholder="名称" id="name" name="name"  value="{$model['name']|default=''}" validate-required="required:请填写名称" />
                        <i class=""></i>
                    </span>
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
             </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="img"> 图片 </label>
                <div class="col-xs-12 col-sm-6">
                    <span class="block input-icon input-icon-right">
                        <input type="file" class="width-100" placeholder="图片" id="img" name="img"  value="{$model['img']|default=''}" />
                        <i class=""></i>
                    </span>
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
            </div>
            <if condition="ACTION_NAME eq update">
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="img">  </label>
                <div class="col-xs-12 col-sm-6">
                    <img src="__PUBLIC__/file/{$model['img']}" width="120" height="60"/>
                </div>
                <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
            </div>
            </if>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="detail_wap"> wap详情 </label>
                <div class="col-xs-12 col-sm-6">
                    <span class="block input-icon input-icon-right">
                        <textarea class="col-xs-12 col-sm-6 width-100" style="padding: 5px 4px;" rows="5" id="detail_wap" name="detail_wap" placeholder="wap详情" validate-required="required:请填写wap详情" >{$model["detail_wap"]|default=""}</textarea>
                        <i class=""></i>
                        <small style="color:gray;">为了让上传图片在手机中正常显示，请将图片宽度设置为100%</small>
                    </span>
                </div>
                <script type="text/javascript">var editor = UE.getEditor("detail_wap");</script>
                <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>

             </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right" for="detail_pc"> pc详情 </label>
                <div class="col-xs-12 col-sm-6">
                    <span class="block input-icon input-icon-right">
                        <textarea class="col-xs-12 col-sm-6 width-100" style="padding: 5px 4px;" rows="5" id="detail_pc" name="detail_pc" placeholder="pc详情" validate-required="required:请填写pc详情" >{$model["detail_pc"]|default=""}</textarea>
                        <i class=""></i>
                    </span>
                </div>
                <script type="text/javascript">var editor = UE.getEditor("detail_pc");</script>
                <div class="help-block col-xs-12 col-sm-reset inline" style="margin-bottom: 5px;"></div>
             </div>
            <div class="clearfix form-actions">
                <div style="margin-left: 25%;">
                    <button class="btn btn-info btn-sm" type="submit">
                        <i class="icon-ok bigger-110"></i>
                        提交
                    </button>
                    &nbsp; &nbsp; &nbsp;
                    <button class="btn btn-sm return" type="button">
                        <i class="icon-reply bigger-110"></i>
                        返回
                    </button>
                </div>
            </div>
        </form>
    </div>
<include file="Public/ace_footer" />
